//**********用户组***********/;
import request from '@/utils/request.js';

/**
 * 保存
 * @doc http://hanma-lesscode.hc-iiot.com/swagger-ui.html#!/
 * data 参数 
 *  appId:'', //$column.comments 	类型:integer 非必填
 *  createBy:'', //$column.comments 	类型:string 非必填
 *  createDate:'', //$column.comments 	类型:string 非必填
 *  deleted:'', //是否删除,0: 未删除 1: 删除  	类型:integer 非必填
 *  id:'', //$column.comments 	类型:integer 非必填
 *  modifyBy:'', //$column.comments 	类型:string 非必填
 *  modifyDate:'', //$column.comments 	类型:string 非必填
 *  name:'', //用户组名称 	类型:string 非必填
 *  parentId:'', //父节点id 	类型:integer 非必填
 *  parentIds:'', //父节点集合 	类型:string 非必填
 *  serialNum:'', //排序序号 	类型:integer 非必填
 * @returns
 * ********
 */
export function postHmusergroup(data={}, config={}){
  return request({
    method: 'post',
    data,
    url: `/api/hmusergroup`,
    ...config,
  }) 
}

/**
 * 修改
 * @doc http://hanma-lesscode.hc-iiot.com/swagger-ui.html#!/
 * data 参数 
 *  appId:'', //$column.comments 	类型:integer 非必填
 *  createBy:'', //$column.comments 	类型:string 非必填
 *  createDate:'', //$column.comments 	类型:string 非必填
 *  deleted:'', //是否删除,0: 未删除 1: 删除  	类型:integer 非必填
 *  id:'', // 	类型:integer 非必填
 *  modifyBy:'', //$column.comments 	类型:string 非必填
 *  modifyDate:'', //$column.comments 	类型:string 非必填
 *  name:'', //用户组名称 	类型:string 非必填
 *  parentId:'', //父节点id 	类型:integer 非必填
 *  parentIds:'', //父节点集合 	类型:string 非必填
 *  serialNum:'', //排序序号 	类型:integer 非必填
 * @returns
 * ********
 */
export function putHmusergroup(data={}, config={}){
  return request({
    method: 'put',
    data,
    url: `/api/hmusergroup`,
    ...config,
  }) 
}

/**
 * 删除
 * @doc http://hanma-lesscode.hc-iiot.com/swagger-ui.html#!/
 * data 参数 // 类型 array
 * []integer
 * @returns
 * ********
 */
export function deleteHmusergroup(data=[], config={}){
  return request({
    method: 'delete',
    data,
    url: `/api/hmusergroup`,
    ...config,
  }) 
}

/**
 * 下移用户组节点
 * @doc http://hanma-lesscode.hc-iiot.com/swagger-ui.html#!/
 * params 参数 
 * id:'', //id 必填
 * @returns
 * ********
 */
export function putHmusergroupDown(params={}, config={}){
  return request({
    method: 'put',
    params,
    url: `/api/hmusergroup/down`,
    ...config,
  }) 
}

/**
 * 获取应用的用户组列表树
 * @doc http://hanma-lesscode.hc-iiot.com/swagger-ui.html#!/
 * ********
 * @returns
 * ********
 */
export function getHmusergroupList(config={}){
  return request({
    method: 'get',
    url: `/api/hmusergroup/list`,
    ...config,
  }) 
}

/**
 * 获取用户角色组列表树
 * @doc http://hanma-lesscode.hc-iiot.com/swagger-ui.html#!/
 * params 参数 
 * userId:'', //userId 必填
 * @returns
 * ********
 */
export function getHmusergroupListByAppUserId(params={}, config={}){
  return request({
    method: 'get',
    params,
    url: `/api/hmusergroup/listByAppUserId`,
    ...config,
  }) 
}

/**
 * 上移用户组节点
 * @doc http://hanma-lesscode.hc-iiot.com/swagger-ui.html#!/
 * params 参数 
 * id:'', //id 必填
 * @returns
 * ********
 */
export function putHmusergroupUp(params={}, config={}){
  return request({
    method: 'put',
    params,
    url: `/api/hmusergroup/up`,
    ...config,
  }) 
}

/**
 * 表单字段验证
 * @doc http://hanma-lesscode.hc-iiot.com/swagger-ui.html#!/
 * params 参数 
 * appId:'', //appId 必填
 * id:'', //id 必填
 * key:'', //key 必填
 * value:'', //value 必填
 * parentId:'', //parentId 必填
 * @returns
 * ********
 */
export function getHmusergroupValidatefield(params={}, config={}){
  return request({
    method: 'get',
    params,
    url: `/api/hmusergroup/validate-field`,
    ...config,
  }) 
}